pandas column processing with custom logic

welcome to shbcf.ru